package com.hds.modules.app.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;

import java.util.Date;

@TableName("tb_user_message")
public class UserMessage {



    private static final long serialVersionUID = -1254896254788861516L;

    public static final String STATUS_DELETED = "deleted"; //已删除
    public static final String STATUS_REPLIED = "replied"; //已回复
    public static final String STATUS_NOREPLY = "notReply"; //未回复

    public static final String OP_ALL = "all";
    public static final String OP_MAX = "max";
    public static final String OP_WEB = "web";

    public static final Integer TYPE_MSG = 0; //已删除
    public static final Integer TYPE_REPLY = 1; //已回复

    /**
     * 主键 ID
     */
    @TableId
    private Integer id;

    /**
     * uid
     */
    private String uid;

    /**
     * openid
     */
    private String openid;


    /**
     * 消息内容
     */
    private String messageCnt;

    /**
     * 消息发送时间
     */
    private Date messageTime;

    /**
     * 专业
     */
    private String major;

    /**
     * 需求
     */
    private String demand;

    /**
     * 主体id
     */
    private Integer mainBodyUid;

    /**
     * 图片
     */
    @TableField("imgs")
    private String imgsStr;

    /**
     * 状态['notReply'-未回复,'replied'-已回复,'deleted'-已删除]
     */
    private String status;

    /**
     * 消息类型[0-用户留言，1-后台回复]
     */
    private Integer type;



    /**
     * username
     */
    @TableField(exist = false)
    private String username;

    /**
     * avatar用户头像
     */
    @TableField(exist = false)
    private String avatar;

    /**
     * mobile
     */
    @TableField(exist = false)
    private String mobile;

    /**
     * 图片
     */
    @TableField(exist = false)
    private String[] imgs;



    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getMessageCnt() {
        return messageCnt;
    }

    public void setMessageCnt(String messageCnt) {
        this.messageCnt = messageCnt;
    }

    public Date getMessageTime() {
        return messageTime;
    }

    public void setMessageTime(Date messageTime) {
        this.messageTime = messageTime;
    }



    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public String getDemand() {
        return demand;
    }

    public void setDemand(String demand) {
        this.demand = demand;
    }

    public String getImgsStr() {
        return imgsStr;
    }

    public void setImgsStr(String imgsStr) {
        this.imgsStr = imgsStr;
    }
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }


    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getMainBodyUid() {
        return mainBodyUid;
    }

    public void setMainBodyUid(Integer mainBodyUid) {
        this.mainBodyUid = mainBodyUid;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String[] getImgs() {
        return imgs;
    }

    public void setImgs(String[] imgs) {
        this.imgs = imgs;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    @Override
    public String toString() {
        return this.getId() + "----" + this.getDemand() + "---" + this.getImgsStr() + "---" + this.getMessageCnt() + "---" + this.getDemand();
    }
}
